package com.lib76.socket.service;

import com.lib76.socket.CommunicationServer;
import com.lib76.socket.SocketObject;

public class SocketServerRunner {

	public static void main(String[] args) {
		boolean result = false;
		result = CommunicationServer.messageProtocolInitial(CommunicationServer.class.getResourceAsStream("/protocol.xml"), null);
		result = CommunicationServer.socketInitial(CommunicationServer.class.getResourceAsStream("/communication_config.xml"), null);
		
		if(result){
			SocketObject server =CommunicationServer.getSocketObject("server");
			if(server.run()){
				System.out.println("服务器启动成功");
			}
		}
	}
}
